import { cur_event_check } from '../../../../global_comps/Classes/cla_event_check';
import { forBindEventThis } from '../../../../global_comps/Func/forBindEventThis';
import { add_new_type_dataMana } from './cla_add_new_type_dataMana';
import type { add_new_type_props } from './cla_add_new_type_props';

const add_new_type_operateTag = 'add_new_type_operate';

export class add_new_type_operate extends add_new_type_dataMana {
  get [Symbol.toStringTag]() {
    return add_new_type_operateTag;
  }

  constructor(props: add_new_type_props) {
    super(props);

    forBindEventThis(this);

    this.eventM.addEventListen(
      this.dom_border,
      'click',
      this.eventBind.boder_click
    );
  }

  /**
   * 主题元素 点击
   *
   * 展开 类型 簇 选择器
   */
  boder_click(event: MouseEvent) {
    if (cur_event_check.set_cur_event(event).left_click().result === false) {
      return;
    }

    this.show_type_select();
  }
}
